<?php 
	class sosmed_model extends CI_model{
		

		function get_sosmed_all(){
			$q = $this->db->query("SELECT s.key key_set, sw.key key_setw, s.*, sw.*, swl.* FROM
									setting s
									INNER JOIN setting_website sw ON s.id_table=sw.id_kategori_sub
									INNER JOIN setting_website_language swl ON sw.id_setting_website=swl.id_setting_website
									WHERE
									s.key='sosial_media' AND swl.id_language='1' ORDER BY sw.sort_order ASC");

			return $q->result();
		}


		function get_sosmed($key){
			$q = $this->db->query("SELECT s.key key_set, sw.key key_setw, s.*, sw.*, swl.* FROM
									setting s
									INNER JOIN setting_website sw ON s.id_table=sw.id_kategori_sub
									INNER JOIN setting_website_language swl ON sw.id_setting_website=swl.id_setting_website
									WHERE
									s.key='sosial_media' AND sw.key='$key' AND swl.id_language='1'");

			return $q->result();
		}

	}

?>